#ifndef MAMBA_SERVICE_ASPECT_COMET_ASPECT_HPP
#define MAMBA_SERVICE_ASPECT_COMET_ASPECT_HPP

#include <fas/misc/command/ad_binder_ptr.hpp>
#include <fas/adv/json_rpc3/aspect.hpp>
#include <fas/filter/binary_filter.hpp>
#include <fas/adv/asp/http/server/aspect.hpp>
#include <vector>

#include "http_aspect.hpp"
#include "json_aspect.hpp"

namespace fasys{

namespace ap = ::fas::pattern;
namespace aa = ::fas::aop;
namespace ad = ::fas::adv;
//namespace adio = ::fas::adv::io;
namespace ajr = ::fas::adv::json_rpc3;
namespace ac = ::fas::command;
namespace af = ::fas::filter;

namespace ah = ::fas::http;
namespace ahr = ::fas::http::reader;
namespace ahw = ::fas::http::writer;

namespace adah = ::fas::adv::asp::http;
namespace adahs = ::fas::adv::asp::http::server;

typedef adah::_input_ _input_;
typedef adah::_output_ _output_;

typedef ap::type_list_n<
  aa::alias<ajr::_input_, adah::_incoming_>,
  aa::alias<adah::_outgoing_, ajr::_writer_>,
  /*
   * aa::advice< af::_on_read_, rtrace<_input_>  >,
   * aa::advice< _output_, wtrace<af::_writer_>  >
   */
  aa::alias< _input_, af::_on_read_>,
  aa::alias< af::_writer_, _output_>
  
>::type comet_advice_list;

typedef aa::aspect<comet_advice_list> comet_aspect_base;

typedef aa::aspect_merge<
  aa::aspect_merge< http_aspect, json_aspect >::type,
  comet_aspect_base
>::type http_json_aspect;

}

#endif
